<!DOCTYPE HTML>
<!--
	Dimension by HTML5 UP
	html5up.net | @ajlkn
	Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
 <head>
  <title>
   Dimension by HTML5 UP
  </title>
  <!-- <meta charset="utf-8" /> -->
  <!-- <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> -->
  <meta charset="utf-8"/>
  <meta content="width=device-width,initial-scale=1.0" name="viewport"/>
  <link href="../../assets/css/article.css" rel="stylesheet"/>
  <link href="https://cdn.bootcss.com/highlight.js/9.15.8/styles/github.min.css" rel="stylesheet"/>
  <noscript>
   <link href="../../assets/css/noscript.css" rel="stylesheet"/>
  </noscript>
 </head>
 <body>
  <div id="app">
  </div>
  <!-- built files will be auto injected -->
 </body>
 <body class="is-preload">
  <!-- Wrapper -->
  <div id="wrapper">
   <!-- Main -->
   <div id="main">
    <article id="article">
     <h1 id="java">
      Java安装
     </h1>
     <hr/>
     <h2 id="centos">
      Centos
     </h2>
     <ul>
      <li>
       <p>
        查找OpenJDK安装包
       </p>
       <ul>
        <li>
         rpm -qa | grep openjdk
        </li>
       </ul>
      </li>
      <li>
       <p>
        卸载OpenJDK安装包
       </p>
       <ul>
        <li>
         yum -y remove java-1.7.0-openjdk-headless.x86_64
        </li>
       </ul>
      </li>
     </ul>
     <h2 id="ubuntulinux-mint">
      Ubuntu或者linux mint
     </h2>
     <div class="codehilite">
      <pre><span></span><code>sudo apt-get update <span class="o">&amp;&amp;</span> apt-get remove openjdk*
sudo tar zxvf jdk-7u80-linux-x64.tar.gz -C /usr/lib/java

vim /etc/profile
<span class="nb">export</span> <span class="nv">JAVA_HOME</span><span class="o">=</span>/usr/java/jdk1.8.0_221
<span class="nb">export</span> <span class="nv">JRE_HOME</span><span class="o">=</span><span class="si">${</span><span class="nv">JAVA_HOME</span><span class="si">}</span>/jre
<span class="nb">export</span> <span class="nv">CLASSPATH</span><span class="o">=</span>.:<span class="si">${</span><span class="nv">JAVA_HOME</span><span class="si">}</span>/lib:<span class="si">${</span><span class="nv">JRE_HOME</span><span class="si">}</span>/lib
<span class="nb">export</span> <span class="nv">PATH</span><span class="o">=</span><span class="si">${</span><span class="nv">JAVA_HOME</span><span class="si">}</span>/bin:<span class="nv">$PATH</span>

<span class="nb">source</span> /etc/profile
java -version
</code></pre>
     </div>
     <h2 id="centos_1">
      Centos
     </h2>
     <div class="codehilite">
      <pre><span></span><code>yum localinstall -y jdk-11.0.9_linux-x64_bin.rpm
</code></pre>
     </div>
     <h2 id="_1">
      参考链接
     </h2>
     <ul>
      <li>
       <a href="https://blog.csdn.net/zitong_ccnu/article/details/40041533">
        CentOS7卸载OpenJDK安装Oracle JDK
       </a>
      </li>
      <li>
       <a href="https://blog.csdn.net/enterys/article/details/53781356">
        Linux Mint 安装JDK
       </a>
      </li>
     </ul>
    </article>
   </div>
   <!-- Footer -->
   <footer id="footer">
    <p class="copyright">
     © Untitled. Design:
     <a href="https://html5up.net">
      HTML5 UP
     </a>
     .
    </p>
   </footer>
  </div>
  <!-- BG -->
  <div id="bg">
  </div>
  <!-- Scripts -->
  <script src="../assets/js/jquery.min.js">
  </script>
  <script src="../assets/js/browser.min.js">
  </script>
  <script src="../assets/js/breakpoints.min.js">
  </script>
  <script src="../assets/js/util.js">
  </script>
  <script src="../assets/js/main.js">
  </script>
 </body>
</html>
